<!DOCTYPE html>
<html xmlns:th="http://www.w3.org/1999/xhtml">
<head>
    <title>订单详情</title>

    <div th:replace="common_cssjs"></div>
    <link type="text/css" rel="stylesheet" media="screen" th:href="@{/css/product.css}">
</head>

<body>
<div th:replace="common/header::nav"></div>
<div class="container">
    <div class="form-horizontal">
        <div class="row">
            <div class="form-group">
                <label class="col-sm-2 control-label">地址</label>

                <div class="col-sm-6">
                    <p class="form-control-static" th:text="${order.address}"></p>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label">邮编</label>

                <div class="col-sm-6">
                    <p class="form-control-static" th:text="${order.zipcode}"></p>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label">电话</label>

                <div class="col-sm-6">
                    <p class="form-control-static" th:text="${order.phone}"></p>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label">联系人</label>

                <div class="col-sm-6">
                    <p class="form-control-static" th:text="${order.consignee}"></p>
                </div>
            </div>

            <div class="form-group">
                <label class="col-sm-2 control-label">创建时间</label>

                <div class="col-sm-6">
                    <p class="form-control-static" th:text="${order.createTime}"></p>
                </div>
            </div>

            <div class="form-group">
                <label class="col-sm-2 control-label">付款时间</label>

                <div class="col-sm-6">
                    <p class="form-control-static" th:text="${order.shipTime}"></p>
                </div>
            </div>

            <div class="form-group">
                <label class="col-sm-2 control-label">发货时间</label>

                <div class="col-sm-6">
                    <p class="form-control-static" th:text="${order.confirmTime}"></p>
                </div>
            </div>
        </div>
    </div>
    <div class="row">
        <div class="page-header">
            <h2>商品详情</h2>
        </div>
        <table class="table table-striped">
            <thead>
            <tr>
                <td>名称</td>
                <td>型号</td>
                <td>编码</td>
                <td>单价</td>
                <td>数量</td>
                <td>总价</td>
            </tr>
            </thead>
            <tbody>
                <tr th:each="orderItem:${order.orderItems}" th:pid="${orderItem.id}">
                    <td><a th:href="@{'/product/'+${orderItem.product.id}}" th:text="${orderItem.product.title}"></a></td>
                    <td th:text="${orderItem.product.model}"></td>
                    <td th:text="${orderItem.product.code}"></td>
                    <td th:text="${orderItem.product.point}"></td>
                    <td th:text="${orderItem.quantity}"></td>
                    <td th:text="${orderItem.product.point*orderItem.quantity}"></td>
                </tr>
            </tbody>
        </table>
    </div>
</div>
<!-- /container -->
<div th:replace="common/footer::copy"></div>
</body>
</html>